Optimal. Leaf size=173 \[ \frac {5 a^{5/2} A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4172, 4002,
4000, 3859, 209, 3877} \begin {gather*} \frac {5 a^{5/2} A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {a^3 (15 A+64 C) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}-\frac {a^2 (15 A-16 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 d}-\frac {a (5 A-2 C) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{5 d}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^{5/2}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3877
Rule 4000
Rule 4002
Rule 4172
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sec (c+d x))^{5/2} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {\int (a+a \sec (c+d x))^{5/2} \left (\frac {5 a A}{2}-\frac {1}{2} a (5 A-2 C) \sec (c+d x)\right ) \, dx}{a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {2 \int (a+a \sec (c+d x))^{3/2} \left (\frac {25 a^2 A}{4}-\frac {1}{4} a^2 (15 A-16 C) \sec (c+d x)\right ) \, dx}{5 a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a^2 (15 A-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {4 \int \sqrt {a+a \sec (c+d x)} \left (\frac {75 a^3 A}{8}+\frac {1}{8} a^3 (15 A+64 C) \sec (c+d x)\right ) \, dx}{15 a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a^2 (15 A-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {1}{2} \left (5 a^2 A\right ) \int \sqrt {a+a \sec (c+d x)} \, dx+\frac {1}{30} \left (a^2 (15 A+64 C)\right ) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {\left (5 a^3 A\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {5 a^{5/2} A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.84, size = 145, normalized size = 0.84 \begin {gather*} \frac {a^2 \left (300 A \text {ArcTan}\left (\sqrt {-1+\sec (c+d x)}\right ) \cos ^2(c+d x)+(60 A+196 C+(45 A+112 C) \cos (c+d x)+4 (15 A+43 C) \cos (2 (c+d x))+15 A \cos (3 (c+d x))) \sqrt {-1+\sec (c+d x)}\right ) \sec (c+d x) \sqrt {a (1+\sec (c+d x))} \tan (c+d x)}{60 d (1+\cos (c+d x)) \sqrt {-1+\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(342\) vs.
\(2(153)=306\).
time = 24.89, size = 343, normalized size = 1.98
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+150 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+120 A \left (\cos ^{4}\left (d x +c \right )\right )+120 A \left (\cos ^{3}\left (d x +c \right )\right )+688 C \left (\cos ^{3}\left (d x +c \right )\right )-240 A \left (\cos ^{2}\left (d x +c \right )\right )-464 C \left (\cos ^{2}\left (d x +c \right )\right )-176 C \cos \left (d x +c \right )-48 C \right ) a^{2}}{120 d \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )}\) | \(343\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1384 vs.
\(2 (153) = 306\).
time = 0.60, size = 1384, normalized size = 8.00 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.52, size = 398, normalized size = 2.30 \begin {gather*} \left [\frac {75 \, {\left (A a^{2} \cos \left (d x + c\right )^{3} + A a^{2} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (15 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (15 \, A + 43 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 28 \, C a^{2} \cos \left (d x + c\right ) + 6 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{30 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}, -\frac {75 \, {\left (A a^{2} \cos \left (d x + c\right )^{3} + A a^{2} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (15 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (15 \, A + 43 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 28 \, C a^{2} \cos \left (d x + c\right ) + 6 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 484 vs.
\(2 (153) = 306\).
time = 2.10, size = 484, normalized size = 2.80 \begin {gather*} -\frac {75 \, A \sqrt {-a} a^{2} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 75 \, A \sqrt {-a} a^{2} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + \frac {60 \, {\left (3 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} A \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - \sqrt {2} A \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}} - \frac {4 \, {\left (15 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 60 \, \sqrt {2} C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (30 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 80 \, \sqrt {2} C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (15 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 32 \, \sqrt {2} C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \cos \left (c+d\,x\right )\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________